<template>
  <div class="table-page-search-wrapper">
    <a-form layout="inline">
      <a-row>
        <a-col :md="8" :sm="12" :xs="24" style="padding:0 8px;">
          <a-form-item label="商品名称:">
            <a-input allowClear v-model="searchForm.orderNo" placeholder="请输入商品名称" />
          </a-form-item>
        </a-col>
        <a-col :md="8" :sm="12" :xs="24" style="padding:0 8px;">
          <a-form-item label="商品类目:">
            <a-select v-model="searchForm.status" placeholder="请选择商品类目" allowClear>
              <a-select-option
                v-for="item in statuslistt"
                :key="item.status"
                :value="item.status"
              >{{item.text}}</a-select-option>
            </a-select>
          </a-form-item>
        </a-col>
        <a-col :md="8" :sm="12" :xs="24" style="padding:0 8px;">
          <a-form-item label="商品状态:">
            <a-select v-model="searchForm.laiyuan" placeholder="请选择商品状态" allowClear>
              <a-select-option
                v-for="item in laiyuanList"
                :key="item.status"
                :value="item.status"
              >{{item.text}}</a-select-option>
            </a-select>
          </a-form-item>
        </a-col>
        <a-col :md="8" :sm="12" :xs="24" style="padding:0 8px;">
          <a-form-item label="供应商名称:">
            <a-input allowClear v-model="searchForm.mendian" placeholder="请输入供应商名称" />
          </a-form-item>
        </a-col>
        <a-col :md="8" :sm="12" :xs="24" style="padding:0 8px;">
          <a-form-item>
            <a-button type="primary" icon="search" @click="searchAction()">查找</a-button>
            <a-button icon="delete" @click="resetSearch()" style="margin-left: 8px;">重置</a-button>
          </a-form-item>
        </a-col>
      </a-row>
    </a-form>
  </div>
</template>
<script>
export default {
  name: 'search',
  props: ['keyName'],
  data() {
    return {
      statuslistt: [], //商品类目
      laiyuanList: [], //商品状态
      searchForm: {}
    }
  },
  methods: {
    searchAction() {
      //执行搜索
      this.$emit('search')
    },
    resetSearch() {
      this.searchForm = {}
      this.$emit('resetSearch')
    },
    getSearchForm() {
      //获取高级搜索条件
      return {
        ...this.searchForm
      }
    }
  }
}
</script>


<style lang="less">
</style>>
